(shortcuts_add_current_folder): Don't leak volume. (#155400,
authorMatthias Clasen <matthiasc@src.gnome.org>
Thu, 14 Oct 2004 19:42:31 +0000 (19:42 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 14 Oct 2004 19:42:31 +0000 (19:42 +0000)
Morten Welinder)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkfilechooserdefault.c

index 96320ebd858650be61ae9e50b132e0d3c9cf351c..c763a4fd4d722487cb6bb026017ac70723a28e85 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
        get text unnecessarily.  (#155384, Morten Welinder)
        (gtk_file_chooser_default_finalize): Don't forget to
        unref the tooltips.  (#155412, Morten Welinder)
+       (shortcuts_add_current_folder): Don't leak volume. (#155400,
+       Morten Welinder)
 
 2004-10-12  Matthias Clasen  <mclasen@redhat.com>
 
index 96320ebd858650be61ae9e50b132e0d3c9cf351c..c763a4fd4d722487cb6bb026017ac70723a28e85 100644 (file)
@@ -4,6 +4,8 @@
        get text unnecessarily.  (#155384, Morten Welinder)
        (gtk_file_chooser_default_finalize): Don't forget to
        unref the tooltips.  (#155412, Morten Welinder)
+       (shortcuts_add_current_folder): Don't leak volume. (#155400,
+       Morten Welinder)
 
 2004-10-12  Matthias Clasen  <mclasen@redhat.com>
 
index 96320ebd858650be61ae9e50b132e0d3c9cf351c..c763a4fd4d722487cb6bb026017ac70723a28e85 100644 (file)
@@ -4,6 +4,8 @@
        get text unnecessarily.  (#155384, Morten Welinder)
        (gtk_file_chooser_default_finalize): Don't forget to
        unref the tooltips.  (#155412, Morten Welinder)
+       (shortcuts_add_current_folder): Don't leak volume. (#155400,
+       Morten Welinder)
 
 2004-10-12  Matthias Clasen  <mclasen@redhat.com>
 
index 96320ebd858650be61ae9e50b132e0d3c9cf351c..c763a4fd4d722487cb6bb026017ac70723a28e85 100644 (file)
@@ -4,6 +4,8 @@
        get text unnecessarily.  (#155384, Morten Welinder)
        (gtk_file_chooser_default_finalize): Don't forget to
        unref the tooltips.  (#155412, Morten Welinder)
+       (shortcuts_add_current_folder): Don't leak volume. (#155400,
+       Morten Welinder)
 
 2004-10-12  Matthias Clasen  <mclasen@redhat.com>
 
index 91113f8d1c28e547c6137fcb19cf2f697153143a..8a4d53bc38b43469af43dcf681fac371ae335490 100644 (file)
@@ -1441,12 +1441,15 @@ shortcuts_add_current_folder (GtkFileChooserDefault *impl)
          strcmp (gtk_file_path_get_string (base_path), gtk_file_path_get_string (impl->current_folder)) == 0)
        {
          success = shortcuts_insert_path (impl, pos, TRUE, volume, NULL, NULL, FALSE, NULL);
-         if (!success)
-           gtk_file_system_volume_free (impl->file_system, volume);
+         if (success)
+           volume = NULL;
        }
       else
        success = shortcuts_insert_path (impl, pos, FALSE, NULL, impl->current_folder, NULL, FALSE, NULL);
 
+      if (volume)
+       gtk_file_system_volume_free (impl->file_system, volume);
+
       if (base_path)
        gtk_file_path_free (base_path);